﻿using System;
using UnityEngine;

namespace SaveDataStructures
{
	// Token: 0x02000355 RID: 853
	[Serializable]
	public class EntityData
	{
		// Token: 0x06001626 RID: 5670 RVA: 0x0008FF90 File Offset: 0x0008E190
		public EntityData(EntityBase entity)
		{
			if (entity == null)
			{
				Debug.LogError("Null entity in save data, empty savedata created");
				return;
			}
			this.id = entity.id;
			this.name = entity.name;
			this.model = entity.model;
			this.position = entity.myTransform.position.ToVirtual();
			this.floorOffset = 0f;
			this.rotation = entity.myTransform.rotation.eulerAngles;
			float num = entity.Scale;
			this.scale = new Vector3(num, num, num);
			this.parent = new ParentData(entity.myTransform.parent);
		}

		// Token: 0x040018D4 RID: 6356
		public int id;

		// Token: 0x040018D5 RID: 6357
		public string name;

		// Token: 0x040018D6 RID: 6358
		public string model;

		// Token: 0x040018D7 RID: 6359
		public Vector3 position;

		// Token: 0x040018D8 RID: 6360
		public float floorOffset;

		// Token: 0x040018D9 RID: 6361
		public Vector3 rotation;

		// Token: 0x040018DA RID: 6362
		public Vector3 scale;

		// Token: 0x040018DB RID: 6363
		public ParentData parent;
	}
}
